#ifndef TASK_QUEUE_H
#define TASK_QUEUE_H

#include "Task.h"
#include <cstdlib>
#include <queue>
#include <memory>
#include <mutex>
#include <condition_variable>

using std::condition_variable;
using std::mutex;
using std::queue;
using std::unique_ptr;

class TaskQueue
{
private:
    size_t _queSize;
    queue<unique_ptr<Task>> _tasks;
    mutex _mtx;
    condition_variable _cond;

public:
    TaskQueue(size_t queSize = 10);
    ~TaskQueue();
    void push_back(Task *);
    std::unique_ptr<Task> front();
    bool empty() const;
    bool full() const;
    size_t size() const;
};
#endif